home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 12 - 1996 / 12.12 Dec 96 / Flat File Databases / Invoice Example ƒ / Functional ƒ / GlobalData.c < prev    next >
Encoding:
Text File  |  1996-03-02  |  1.3 KB  |  70 lines  |  [TEXT/CWIE]

  1. // GlobalData.c
  2. #include "BTreeDef.h"
  3. #include "InvoiceGlobals.h"
  4.  
  5. //Here are the actual variables 
  6.  
  7. //need a flag that shows if a file is open
  8.  Boolean gFileIsOpen;
  9.  
  10. //These are the variables for the data records when they are in memory
  11.  
  12.  CustomerType     gCustomer;
  13.  unsigned char    gCustString[40];
  14.  PartType        gPart;
  15.  InvoiceType    gInvoice;
  16.  LineItemType    gLineItems[2];
  17.  
  18. // These are variables that will be used by B-Tree Helper 
  19.  TreeListHandle     gInvoiceTrees;
  20.  FileControlHandle    gInvoiceFCH;
  21.  long                gBlockSize;
  22.  long                gSpareBlocks;
  23.  StandardFileReply    gFileReply;
  24.  SFTypeList            gTypeList;
  25.  short                gNumTypes;
  26.  short                gPermission;
  27.  
  28. //Our sequence handle
  29. SRHandle    gSequenceHandle;
  30.  
  31.   
  32.  //resource fork reference number
  33.  short        gResFileNo;
  34.  
  35.  // action switches
  36. // initialize to first choice in the pop up
  37. short    gCustomerAction = 1;
  38. short    gPartAction = 1;
  39. short    gInvoiceAction = 1; 
  40.  
  41.  
  42. Boolean gDone;
  43. Boolean gInBackground;
  44. DialogPtr gCustomerDialog;
  45. DialogPtr gPartDialog;
  46. DialogPtr gInvoiceDialog;
  47. MenuHandle gFileMenu;
  48. MenuHandle gEditMenu;
  49. MenuHandle gWindowMenu;
  50.  
  51.  
  52. // this part is for debugging with B-Tree helper -- ERR
  53.  
  54. // B-Tree HELPER™ - © 1985-90, 1993-5 (M)agreeable software, inc.
  55.  
  56. // Version 2.2
  57.  
  58. // 17 May 1995
  59.     
  60. // Global data for testing
  61.  
  62.  
  63.  
  64. #if qDebug
  65.  
  66. FILE    *gDebugStream = nil;    // Debugging output stream
  67.  
  68. #endif
  69.  
  70.